<?php



namespace app\userapi\validate;

use taoser\Validate;

class resetPasswordValidate extends Validate
{
    protected $rule = [
        'username' => 'require',
        'code'     => 'require',
        'password' => 'require|min:8|max:16',
    ];
    protected $message = [
        'username.require' => '请输入用户名',
        'code.require'     => '请输入验证码!',
        'password.require' => '请输入新密码!',
        'password.min'     => '密码位数必须在8~16位之间',
        'password.max'     => '密码位数必须在8~16位之间',

    ];

    public function sceneResetPassword()
    {
        return $this->only(['username', 'code', 'password']);
    }
}
